import 'package:flutter/material.dart';

// 社区页面【局部】共享数据
class CommunityProvider with ChangeNotifier{
  int _currentIndex = 0; // 获取社区页面要显示的下标

  // 取值和赋值
  get currentIndex => this._currentIndex; 
  set currentIndex(int currentIndex){
    this._currentIndex = currentIndex;
    notify();
  }

  // 通知刷新
  notify(){
    notifyListeners();
  }
}